<?php

Yii::import('application.models._base.BaseFavoriteShare');

class FavoriteShare extends BaseFavoriteShare
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}


    public function allFavoriteShare($share_id){
        $db = Yii::app()->db->createCommand();
        $info = $db->select('u.id,u.nick_name,u.avatar_status,u.avatar_public,u.domain')
            ->from('{{favorite_share}} fs')
            ->leftJoin('{{user}} u','fs.user_id=u.id')
            ->where('fs.share_id=:share_id',array(':share_id'=>$share_id))
            ->order('fs.create_time asc')
            ->queryAll();
        return $info;
    }


}